home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / pt20pc.zip / TEST.C < prev    next >
C/C++ Source or Header  |  1991-02-04  |  409b  |  25 lines

  1. #include "dos.h"
  2.  
  3. main(argc, argv)
  4.     char *argv[];
  5. {
  6.     union REGS regs, cregs;
  7.     long i, max;
  8.     int fid;
  9.     
  10.     max = atoi(argv[1]);
  11.     for(i = 0; i < max; ++i) {
  12.         if( argc == 2 ) {
  13.             regs.h.ah = 0x3D;    /* open file */
  14.             regs.h.al = (char)0;
  15.             regs.x.dx = (int)"test.c";
  16.             intdos(®s, ®s);
  17.  
  18.             cregs.x.bx = regs.x.ax;
  19.             cregs.h.ah = 0x3E;
  20.             intdos(&cregs, &cregs);
  21.         }
  22.     }
  23.     exit(0);
  24. }
  25.